/*
 * @Description: 路由路口
 * @Author: iamsmiling
 * @Date: 2021-07-11 16:55:22
 * @LastEditTime: 2021-07-11 20:09:40
 */

function initRouter(koa){
  const fs = require("fs");
  let path = __dirname+"/router_path/"
  let files =  fs.readdirSync(path)
  for (let f of files) {
  let r = require(path+f)
  koa.use(r.routes(),r.allowedMethods());
  }
}
module.exports = initRouter